package cn.cheln.explorer.ds.util;

import cn.cheln.explorer.beans.FileUtil;
import cn.cheln.support.log.Logs;
import cn.cheln.support.unknown.ComparatorRepo;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;

public class FileMgrCategory
{
  public static Map<String, String> categoryMap;
  public static List<String> mediaCategory = Arrays.asList(new String[] { "audio", "video", "image" });

  static
  {
    categoryMap = new TreeMap(ComparatorRepo.stringKey);
    categoryMap.put("application/vnd.shortcut.package-archive", "apk");
    categoryMap.put("image", "image");
    categoryMap.put("audio", "audio");
    categoryMap.put("video", "video");
    categoryMap.put("application", "doc");
    categoryMap.put("text", "doc");
    categoryMap.put("lewa/theme", "lewa/theme");
  }

  public static String getCategory(String paramString)
  {
    if (paramString == null)
      return null;
    if (categoryMap.containsKey(paramString))
      return ((String)categoryMap.get(paramString));
    String str1 = FileUtil.parseMimePrefix(paramString);
    String str2 = (String)categoryMap.get(str1);
    if (str2 == null)
    {
      Logs.i(paramString);
      throw new IllegalStateException("cannt find any category mapped the mime");
    }
    return str2;
  }

  public static Map<String, String> getCategoryMap()
  {
    return categoryMap;
  }
}

/* Location:           H:\360云盘\lewa_explorer_3.0\bin\FileApp_orig_dex2jar.jar
 * Qualified Name:     cn.cheln.explorer.ds.util.FileMgrCategory
 * JD-Core Version:    0.5.2
 */